From: Glenn Morris Date: Sat, 11 Dec 2010 02:50:58 +0000 (-0800) Subject: * lisp/textmodes/sgml-mode.el (sgml-xml-guess): Add .xhtml extension. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~5410 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=f985641e8784ddbc05ccf51522c6d6b707f90456;p=emacs.git * lisp/textmodes/sgml-mode.el (sgml-xml-guess): Add .xhtml extension. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index afa7b5114a5..bc027107bc9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-12-11 Glenn Morris + + * textmodes/sgml-mode.el (sgml-xml-guess): Add .xhtml extension. + 2010-12-11 Karel Klíč * files.el (auto-mode-alist): Use html-mode for *.xhtml. (Bug#7606) diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 47d2f7a45e0..a525c1a7e2c 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -384,6 +384,9 @@ a DOCTYPE or an XML declaration." (save-excursion (goto-char (point-min)) (or (string= "xml" (file-name-extension (or buffer-file-name ""))) + ;; Maybe the buffer-size check isn't needed, I don't know. + (and (zerop (buffer-size)) + (string= "xhtml" (file-name-extension (or buffer-file-name "")))) (looking-at "\\s-*<\\?xml") (when (re-search-forward (eval-when-compile @@ -2153,5 +2156,4 @@ Can be used as a value for `html-mode-hook'." (provide 'sgml-mode) -;; arch-tag: 9675da94-b7f9-4bda-ad19-73ed7b4fb401 ;;; sgml-mode.el ends here